#ifndef MESH_H
#define MESH_H

#include "d3dUtil.h"

namespace mgfx
{
	class SimpleMeshCreator;
	class Mesh
	{
	private:
		Mesh(ID3DX10Mesh * mesh, int numIndices)
		{
			assert(mesh != NULL);
			DXMesh = mesh;
			NumIndices = numIndices;
		}
		Mesh(Mesh & mesh)
		{
			DXMesh = mesh.DXMesh;
			NumIndices = mesh.NumIndices;
		}
		Mesh& operator=(Mesh & mesh)
		{
			DXMesh = mesh.DXMesh;
			NumIndices = mesh.NumIndices;
			return *this;
		}

	public:
		~Mesh()
		{
			ReleaseCOM(DXMesh);
		}

		ID3DX10Mesh * DXMesh;
		int NumIndices;

		friend class SimpleMeshCreator;
	};
}

#endif